
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh_Hans">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>提交补丁 &#8212; Django 3.2.11.dev 文档</title>
    <link rel="stylesheet" href="../../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../../_static/language_data.js"></script>
    <link rel="index" title="索引" href="../../../genindex.html" />
    <link rel="search" title="搜索" href="../../../search.html" />
    <link rel="next" title="使用 Git 和 GitHub 工作" href="working-with-git.html" />
    <link rel="prev" title="单元测试集" href="unit-tests.html" />



 
<script src="../../../templatebuiltins.js"></script>
<script>
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../../../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);</script>

  </head><body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../../../index.html">Django 3.2.11.dev 文档</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../../../index.html">Home</a>  |
        <a title="Table of contents" href="../../../contents.html">Table of contents</a>  |
        <a title="Global index" href="../../../genindex.html">Index</a>  |
        <a title="Module index" href="../../../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="unit-tests.html" title="单元测试集">previous</a>
     |
    <a href="../../index.html" title="Django internals" accesskey="U">up</a>
   |
    <a href="working-with-git.html" title="使用 Git 和 GitHub 工作">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="internals-contributing-writing-code-submitting-patches">
            
  <div class="section" id="s-submitting-patches">
<span id="submitting-patches"></span><h1>提交补丁<a class="headerlink" href="#submitting-patches" title="永久链接至标题">¶</a></h1>
<p>我们总是感谢Django代码的补丁。确实，具有相关补丁的错误报告将比没有补丁的错误报告 <em>更</em> 快地得到修复。</p>
<div class="section" id="s-typo-fixes-and-trivial-documentation-changes">
<span id="typo-fixes-and-trivial-documentation-changes"></span><h2>错字修复和琐碎的文档更改<a class="headerlink" href="#typo-fixes-and-trivial-documentation-changes" title="永久链接至标题">¶</a></h2>
<p>If you are fixing a really trivial issue, for example changing a word in the
documentation, the preferred way to provide the patch is using GitHub pull
requests without a Trac ticket.</p>
<p>有关如何使用拉取请求的更多详细信息，请参见:doc:<cite>working-with-git</cite></p>
</div>
<div class="section" id="s-claiming-tickets">
<span id="claiming-tickets"></span><h2>“发布”工单<a class="headerlink" href="#claiming-tickets" title="永久链接至标题">¶</a></h2>
<p>在一个全球有数百个贡献者的开源项目中，有效地管理沟通以避免重复工作并尽可能提高贡献者的效率是非常重要的。</p>
<p>因此，我们的政策是供贡献者“发布”工单，以便让其他开发人员知道正在处理特定的错误或功能。</p>
<p>如果您确定了要做出的贡献并且有能力解决（通过编程能力，Django内核知识水平和时间可用性来衡量），请按照以下步骤进行发表：</p>
<ul class="simple">
<li><a class="reference external" href="https://code.djangoproject.com/github/login">Login using your GitHub account</a> or <a class="reference external" href="https://www.djangoproject.com/accounts/register/">create an account</a> in our ticket
system. If you have an account but have forgotten your password, you can
reset it using the <a class="reference external" href="https://www.djangoproject.com/accounts/password/reset/">password reset page</a>.</li>
<li>如果尚无此问题的工单，请在我们的 <a class="reference external" href="https://code.djangoproject.com/">ticket tracker</a> 工单追踪系统中创建一个。</li>
<li>If a ticket for this issue already exists, make sure nobody else has
claimed it. To do this, look at the &quot;Owned by&quot; section of the ticket.
If it's assigned to &quot;nobody,&quot; then it's available to be claimed.
Otherwise, somebody else may be working on this ticket. Either find another
bug/feature to work on, or contact the developer working on the ticket to
offer your help. If a ticket has been assigned for weeks or months without
any activity, it's probably safe to reassign it to yourself.</li>
<li>Log into your account, if you haven't already, by clicking &quot;GitHub Login&quot;
or &quot;DjangoProject Login&quot; in the upper left of the ticket page.</li>
<li>Claim the ticket by clicking the &quot;assign to myself&quot; radio button under
&quot;Action&quot; near the bottom of the page, then click &quot;Submit changes.&quot;</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">注解</p>
<p class="last">Django软件基金会要求对Django贡献不小的补丁的人签署并提交 <a class="reference external" href="https://www.djangoproject.com/foundation/cla/">Contributor License Agreement</a> 贡献者许可协议，以确保Django软件基金会对所有贡献都拥有明确的许可，从而为所有用户提供明确的许可。</p>
</div>
<div class="section" id="s-ticket-claimers-responsibility">
<span id="ticket-claimers-responsibility"></span><h3>工单发表者的责任<a class="headerlink" href="#ticket-claimers-responsibility" title="永久链接至标题">¶</a></h3>
<p>发布工单后，您有责任以合理及时的方式处理该工单。 如果您没有时间来处理它，请先取消发布或不发布它！</p>
<p>如果一两周内没有任何关于特定已发布工单的进展迹象，则另一位开发人员可能会要求您放弃该发布了的工单，以使其不再被垄断，而其他人也可以发布。</p>
<p>如果您已发布工单，并且要花很长时间（几天或几周）编写代码，请通过在工单上发布评论来使每个人都保持最新状态。如果您不提供定期更新，并且不响应进度报告的请求，则您对工单的要求可能会被撤消。</p>
<p>与往常一样，多交流好过少交流！</p>
</div>
<div class="section" id="s-which-tickets-should-be-claimed">
<span id="which-tickets-should-be-claimed"></span><h3>应该发布哪类工单？<a class="headerlink" href="#which-tickets-should-be-claimed" title="永久链接至标题">¶</a></h3>
<p>Going through the steps of claiming tickets is overkill in some cases.</p>
<p>In the case of small changes, such as typos in the documentation or small bugs
that will only take a few minutes to fix, you don't need to jump through the
hoops of claiming tickets. Submit your patch directly and you're done!</p>
<p>It is <em>always</em> acceptable, regardless whether someone has claimed it or not, to
submit patches to a ticket if you happen to have a patch ready.</p>
</div>
</div>
<div class="section" id="s-patch-style">
<span id="s-id1"></span><span id="patch-style"></span><span id="id1"></span><h2>补丁的风格<a class="headerlink" href="#patch-style" title="永久链接至标题">¶</a></h2>
<p>确保您所做的任何贡献至少满足以下要求：</p>
<ul class="simple">
<li>解决问题或添加功能所需的代码是补丁的重要组成部分，但不是唯一的部分。 一个好的补丁程序还应该包括一个 <span class="xref std std-doc">regression test 1</span> 回归测试以验证已修复的行为并防止问题再次出现。 另外，如果某些工单与您编写的代码相关，请在测试中的一些注释中提及工单编号，以便在提交补丁程序并关闭工单后可以轻松地追溯相关的讨论。</li>
<li>如果与修补程序关联的代码添加了新功能或修改了现有功能的行为，则该修补程序还应包含文档。</li>
</ul>
<p>When you think your work is ready to be reviewed, send <a class="reference internal" href="working-with-git.html"><span class="doc">a GitHub pull
request</span></a>. Please review the patch yourself using our
<a class="reference internal" href="#patch-review-checklist"><span class="std std-ref">patch review checklist</span></a> first.</p>
<p>If you can't send a pull request for some reason, you can also use patches in
Trac. When using this style, follow these guidelines.</p>
<ul class="simple">
<li>Submit patches in the format returned by the <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">diff</span></code> command.</li>
<li>使用“附加文件”按钮将补丁附加到 <a class="reference external" href="https://code.djangoproject.com/">ticket tracker</a> 工单跟踪系统中的工单上。 除非是单行补丁，否则请 <em>不要</em> 将补丁放入工单描述或注释中。</li>
<li>用扩展名 <code class="docutils literal notranslate"><span class="pre">.diff</span></code> 命名补丁文件； 这将使工单跟踪系统应用正确的语法突出显示，这非常有帮助。</li>
</ul>
<p>无论您以何种方式提交工作成果，请按照以下步骤操作。</p>
<ul class="simple">
<li>Make sure your code fulfills the requirements in our <a class="reference internal" href="#patch-review-checklist"><span class="std std-ref">patch review
checklist</span></a>.</li>
<li>Check the &quot;Has patch&quot; box on the ticket and make sure the &quot;Needs
documentation&quot;, &quot;Needs tests&quot;, and &quot;Patch needs improvement&quot; boxes aren't
checked. This makes the ticket appear in the &quot;Patches needing review&quot; queue
on the <a class="reference external" href="https://dashboard.djangoproject.com/">Development dashboard</a>.</li>
</ul>
</div>
<div class="section" id="s-non-trivial-patches">
<span id="non-trivial-patches"></span><h2>不一般的补丁<a class="headerlink" href="#non-trivial-patches" title="永久链接至标题">¶</a></h2>
<p>A &quot;non-trivial&quot; patch is one that is more than a small bug fix. It's a patch
that introduces Django functionality and makes some sort of design decision.</p>
<p>If you provide a non-trivial patch, include evidence that alternatives have
been discussed on <a class="reference internal" href="../../mailing-lists.html#django-developers-mailing-list"><span class="std std-ref">django-developers</span></a>.</p>
<p>If you're not sure whether your patch should be considered non-trivial, ask on
the ticket for opinions.</p>
</div>
<div class="section" id="s-deprecating-a-feature">
<span id="s-id2"></span><span id="deprecating-a-feature"></span><span id="id2"></span><h2>Deprecating a feature<a class="headerlink" href="#deprecating-a-feature" title="永久链接至标题">¶</a></h2>
<p>There are a couple of reasons that code in Django might be deprecated:</p>
<ul class="simple">
<li>If a feature has been improved or modified in a backwards-incompatible way,
the old feature or behavior will be deprecated.</li>
<li>Sometimes Django will include a backport of a Python library that's not
included in a version of Python that Django currently supports. When Django
no longer needs to support the older version of Python that doesn't include
the library, the library will be deprecated in Django.</li>
</ul>
<p>As the <a class="reference internal" href="../../release-process.html#internal-release-deprecation-policy"><span class="std std-ref">deprecation policy</span></a> describes,
the first release of Django that deprecates a feature (<code class="docutils literal notranslate"><span class="pre">A.B</span></code>) should raise a
<code class="docutils literal notranslate"><span class="pre">RemovedInDjangoXXWarning</span></code> (where XX is the Django version where the feature
will be removed) when the deprecated feature is invoked. Assuming we have good
test coverage, these warnings are converted to errors when <a class="reference internal" href="unit-tests.html#running-unit-tests"><span class="std std-ref">running the
test suite</span></a> with warnings enabled:
<code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-Wa</span> <span class="pre">runtests.py</span></code>. Thus, when adding a <code class="docutils literal notranslate"><span class="pre">RemovedInDjangoXXWarning</span></code>
you need to eliminate or silence any warnings generated when running the tests.</p>
<p>The first step is to remove any use of the deprecated behavior by Django itself.
Next you can silence warnings in tests that actually test the deprecated
behavior by using the <code class="docutils literal notranslate"><span class="pre">ignore_warnings</span></code> decorator, either at the test or class
level:</p>
<ol class="arabic">
<li><p class="first">In a particular test:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.test</span> <span class="kn">import</span> <span class="n">ignore_warnings</span>
<span class="kn">from</span> <span class="nn">django.utils.deprecation</span> <span class="kn">import</span> <span class="n">RemovedInDjangoXXWarning</span>

<span class="nd">@ignore_warnings</span><span class="p">(</span><span class="n">category</span><span class="o">=</span><span class="n">RemovedInDjangoXXWarning</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">test_foo</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="o">...</span>
</pre></div>
</div>
</li>
<li><p class="first">For an entire test case:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.test</span> <span class="kn">import</span> <span class="n">ignore_warnings</span>
<span class="kn">from</span> <span class="nn">django.utils.deprecation</span> <span class="kn">import</span> <span class="n">RemovedInDjangoXXWarning</span>

<span class="nd">@ignore_warnings</span><span class="p">(</span><span class="n">category</span><span class="o">=</span><span class="n">RemovedInDjangoXXWarning</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">MyDeprecatedTests</span><span class="p">(</span><span class="n">unittest</span><span class="o">.</span><span class="n">TestCase</span><span class="p">):</span>
    <span class="o">...</span>
</pre></div>
</div>
</li>
</ol>
<p>You can also add a test for the deprecation warning:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">django.utils.deprecation</span> <span class="kn">import</span> <span class="n">RemovedInDjangoXXWarning</span>

<span class="k">def</span> <span class="nf">test_foo_deprecation_warning</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
    <span class="n">msg</span> <span class="o">=</span> <span class="s1">&#39;Expected deprecation message&#39;</span>
    <span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertWarnsMessage</span><span class="p">(</span><span class="n">RemovedInDjangoXXWarning</span><span class="p">,</span> <span class="n">msg</span><span class="p">):</span>
        <span class="c1"># invoke deprecated behavior</span>
</pre></div>
</div>
<p>Finally, there are a couple of updates to Django's documentation to make:</p>
<ol class="arabic simple">
<li>If the existing feature is documented, mark it deprecated in documentation
using the <code class="docutils literal notranslate"><span class="pre">..</span> <span class="pre">deprecated::</span> <span class="pre">A.B</span></code> annotation. Include a short description
and a note about the upgrade path if applicable.</li>
<li>Add a description of the deprecated behavior, and the upgrade path if
applicable, to the current release notes (<code class="docutils literal notranslate"><span class="pre">docs/releases/A.B.txt</span></code>) under
the &quot;Features deprecated in A.B&quot; heading.</li>
<li>Add an entry in the deprecation timeline (<code class="docutils literal notranslate"><span class="pre">docs/internals/deprecation.txt</span></code>)
under the appropriate version describing what code will be removed.</li>
</ol>
<p>Once you have completed these steps, you are finished with the deprecation.
In each <a class="reference internal" href="../../release-process.html#term-feature-release"><span class="xref std std-term">feature release</span></a>, all
<code class="docutils literal notranslate"><span class="pre">RemovedInDjangoXXWarning</span></code>s matching the new version are removed.</p>
</div>
<div class="section" id="s-javascript-patches">
<span id="javascript-patches"></span><h2>JavaScript patches<a class="headerlink" href="#javascript-patches" title="永久链接至标题">¶</a></h2>
<p>For information on JavaScript patches, see the <a class="reference internal" href="javascript.html#javascript-patches"><span class="std std-ref">JavaScript patches</span></a>
documentation.</p>
</div>
<div class="section" id="s-patch-review-checklist">
<span id="s-id3"></span><span id="patch-review-checklist"></span><span id="id3"></span><h2>Patch review checklist<a class="headerlink" href="#patch-review-checklist" title="永久链接至标题">¶</a></h2>
<p>Use this checklist to review a pull request. If you are reviewing a pull
request that is not your own and it passes all the criteria below, please set
the &quot;Triage Stage&quot; on the corresponding Trac ticket to &quot;Ready for checkin&quot;.
If you've left comments for improvement on the pull request, please tick the
appropriate flags on the Trac ticket based on the results of your review:
&quot;Patch needs improvement&quot;, &quot;Needs documentation&quot;, and/or &quot;Needs tests&quot;. As time
and interest permits, committers do final reviews of &quot;Ready for checkin&quot;
tickets and will either commit the patch or bump it back to &quot;Accepted&quot; if
further works need to be done. If you're looking to become a committer,
doing thorough reviews of patches is a great way to earn trust.</p>
<p>Looking for a patch to review? Check out the &quot;Patches needing review&quot; section
of the <a class="reference external" href="https://dashboard.djangoproject.com/">Django Development Dashboard</a>.
Looking to get your patch reviewed? Ensure the Trac flags on the ticket are
set so that the ticket appears in that queue.</p>
<div class="section" id="s-documentation">
<span id="documentation"></span><h3>文档<a class="headerlink" href="#documentation" title="永久链接至标题">¶</a></h3>
<ul class="simple">
<li>Does the documentation build without any errors (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">html</span></code>, or
<code class="docutils literal notranslate"><span class="pre">make.bat</span> <span class="pre">html</span></code> on Windows, from the <code class="docutils literal notranslate"><span class="pre">docs</span></code> directory)?</li>
<li>Does the documentation follow the writing style guidelines in
<a class="reference internal" href="../writing-documentation.html"><span class="doc">编写文档</span></a>?</li>
<li>Are there any <a class="reference internal" href="../writing-documentation.html#documentation-spelling-check"><span class="std std-ref">spelling errors</span></a>?</li>
</ul>
</div>
<div class="section" id="s-bugs">
<span id="bugs"></span><h3>Bugs<a class="headerlink" href="#bugs" title="永久链接至标题">¶</a></h3>
<ul class="simple">
<li>Is there a proper regression test (the test should fail before the fix
is applied)?</li>
<li>If it's a bug that <a class="reference internal" href="../../release-process.html#supported-versions-policy"><span class="std std-ref">qualifies for a backport</span></a>
to the stable version of Django, is there a release note in
<code class="docutils literal notranslate"><span class="pre">docs/releases/A.B.C.txt</span></code>? Bug fixes that will be applied only to the main
branch don't need a release note.</li>
</ul>
</div>
<div class="section" id="s-new-features">
<span id="new-features"></span><h3>New Features<a class="headerlink" href="#new-features" title="永久链接至标题">¶</a></h3>
<ul class="simple">
<li>Are there tests to &quot;exercise&quot; all of the new code?</li>
<li>Is there a release note in <code class="docutils literal notranslate"><span class="pre">docs/releases/A.B.txt</span></code>?</li>
<li>Is there documentation for the feature and is it <a class="reference internal" href="../writing-documentation.html#documenting-new-features"><span class="std std-ref">annotated
appropriately</span></a> with
<code class="docutils literal notranslate"><span class="pre">..</span> <span class="pre">versionadded::</span> <span class="pre">A.B</span></code> or <code class="docutils literal notranslate"><span class="pre">..</span> <span class="pre">versionchanged::</span> <span class="pre">A.B</span></code>?</li>
</ul>
</div>
<div class="section" id="s-id4">
<span id="id4"></span><h3>Deprecating a feature<a class="headerlink" href="#id4" title="永久链接至标题">¶</a></h3>
<p>See the <a class="reference internal" href="#deprecating-a-feature"><span class="std std-ref">Deprecating a feature</span></a> guide.</p>
</div>
<div class="section" id="s-all-code-changes">
<span id="all-code-changes"></span><h3>All code changes<a class="headerlink" href="#all-code-changes" title="永久链接至标题">¶</a></h3>
<ul class="simple">
<li>Does the <a class="reference internal" href="coding-style.html"><span class="doc">coding style</span></a> conform to our
guidelines? Are there any <code class="docutils literal notranslate"><span class="pre">flake8</span></code> errors? You can install the
<a class="reference internal" href="coding-style.html#coding-style-pre-commit"><span class="std std-ref">pre-commit</span></a> hooks to automatically catch
these errors.</li>
<li>If the change is backwards incompatible in any way, is there a note
in the release notes (<code class="docutils literal notranslate"><span class="pre">docs/releases/A.B.txt</span></code>)?</li>
<li>Is Django's test suite passing?</li>
</ul>
</div>
<div class="section" id="s-all-tickets">
<span id="all-tickets"></span><h3>All tickets<a class="headerlink" href="#all-tickets" title="永久链接至标题">¶</a></h3>
<ul class="simple">
<li>Is the pull request a single squashed commit with a message that follows our
<a class="reference internal" href="../committing-code.html#committing-guidelines"><span class="std std-ref">commit message format</span></a>?</li>
<li>Are you the patch author and a new contributor? Please add yourself to the
<code class="docutils literal notranslate"><span class="pre">AUTHORS</span></code> file and submit a <a class="reference external" href="https://www.djangoproject.com/foundation/cla/">Contributor License Agreement</a>.</li>
</ul>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">提交补丁</a><ul>
<li><a class="reference internal" href="#typo-fixes-and-trivial-documentation-changes">错字修复和琐碎的文档更改</a></li>
<li><a class="reference internal" href="#claiming-tickets">“发布”工单</a><ul>
<li><a class="reference internal" href="#ticket-claimers-responsibility">工单发表者的责任</a></li>
<li><a class="reference internal" href="#which-tickets-should-be-claimed">应该发布哪类工单？</a></li>
</ul>
</li>
<li><a class="reference internal" href="#patch-style">补丁的风格</a></li>
<li><a class="reference internal" href="#non-trivial-patches">不一般的补丁</a></li>
<li><a class="reference internal" href="#deprecating-a-feature">Deprecating a feature</a></li>
<li><a class="reference internal" href="#javascript-patches">JavaScript patches</a></li>
<li><a class="reference internal" href="#patch-review-checklist">Patch review checklist</a><ul>
<li><a class="reference internal" href="#documentation">文档</a></li>
<li><a class="reference internal" href="#bugs">Bugs</a></li>
<li><a class="reference internal" href="#new-features">New Features</a></li>
<li><a class="reference internal" href="#id4">Deprecating a feature</a></li>
<li><a class="reference internal" href="#all-code-changes">All code changes</a></li>
<li><a class="reference internal" href="#all-tickets">All tickets</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>上一个主题</h4>
  <p class="topless"><a href="unit-tests.html"
                        title="上一章">单元测试集</a></p>
  <h4>下一个主题</h4>
  <p class="topless"><a href="working-with-git.html"
                        title="下一章">使用 Git 和 GitHub 工作</a></p>
  <div role="note" aria-label="source link">
    <h3>本页</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/internals/contributing/writing-code/submitting-patches.txt"
            rel="nofollow">显示源代码</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>快速搜索</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="转向" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">12月 07, 2021</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="unit-tests.html" title="单元测试集">previous</a>
     |
    <a href="../../index.html" title="Django internals" accesskey="U">up</a>
   |
    <a href="working-with-git.html" title="使用 Git 和 GitHub 工作">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>